Skip to content

Pin npx-launched packages to fixed versions - #787

Open
Dextheking1 wants to merge 2 commits into
cursor:mainfrom
Dextheking1:fix/pin-npx-package-versions
Open

Dextheking1 wants to merge 2 commits into
cursor:mainfrom
Dextheking1:fix/pin-npx-package-versions

Conversation

@Dextheking1

@Dextheking1 Dextheking1 commented Oct 23, 2026 •

Copy link
Copy Markdown

Playwright and Xero MCP configs launch with npx -y pkg@latest. The statechart renderer runs npx -y @mermaid-js/mermaid-cli with no version at all. The agent-compatibility instructions tell the agent to run npx -y agent-compatibility@latest.

Cursor starts stdio MCP servers when a plugin is enabled, and -y skips the only install prompt. So whatever @latest resolves to that day downloads and runs with the user's environment. For Xero that env includes XERO_CLIENT_ID and XERO_CLIENT_SECRET. A bad publish, a hijacked maintainer account, or a registry incident becomes code execution on every user who has the plugin enabled, with no diff for anyone to review.

Fix: pin all four to their current releases.

  • @playwright/mcp 0.0.83
  • @xeroapi/xero-mcp-server 0.0.17
  • @mermaid-js/mermaid-cli 12.0.0
  • agent-compatibility 0.1.7

Updates then land as normal version bumps in a PR instead of silently from the registry.

Verified: ran the shipped Playwright command as-is, it fetched and ran 0.0.83. node scripts/generate-pstack-harness-trees.mjs --check passes with both statechart copies edited.


Note

Low Risk
Documentation and MCP config-only changes that lock known releases; behavior stays the same until maintainers bump versions in a follow-up PR.

Overview
Replaces npx …@latest (and equivalent unpinned invocations) with fixed npm versions wherever plugins or agents download and run packages at enable/scan time.

Agent Compatibility docs and the compatibility-scan-review agent now call [email protected] instead of @latest. Playwright (mcp.json + README) pins @playwright/[email protected]. Xero (mcp.json + README) pins @xeroapi/[email protected].

The intent is to stop silent registry drift on stdio MCP startup (including env that carries secrets for Xero) so upgrades show up as explicit version bumps in PRs.

Reviewed by Cursor Bugbot for commit 0e215d9. Bugbot is set up for automated code reviews on this repo. Configure here.

playwright and xero MCP configs used @latest, the statechart renderer used an unversioned mermaid-cli, and the agent-compatibility instructions used @latest. Pin all four to their current releases.
@Dextheking1
Dextheking1 marked this pull request as ready for review October 23, 2026 10:12
@deanrie

deanrie commented Oct 23, 2026

Copy link
Copy Markdown

Hey @Dextheking1, checked the pins against the registry: @playwright/[email protected], @mermaid-js/[email protected], @xeroapi/[email protected] and [email protected] are each the current latest as of today, and both statechart copies (pstack/ and harness/pstack/claude-code/) got the same edit, so generate-pstack-harness-trees.mjs --check should stay green. No overlap with #785, which touches statechart.mjs on different lines; git merge-tree of the two branches is clean.

One thing worth stating in the PR body: with @latest gone, these four strings are now the only place a version lives, and nothing in the repo bumps them. Playwright MCP shipped three releases in September alone. Do you want to add a one-line note in each README on how to move the pin, or is the intent that maintainers bump by hand when a release matters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants